import request from '@/utils/request'

const LOGIN = '/login';
const REGISTER = "/pyUser/register";
const USER_INFO = "/pyUser/getInfo";


export function login(data){
    return request({
        url: LOGIN,
        method: 'POST',
        data
    })
}

export function register(data) {
    return request({
        url: REGISTER,
        method: 'POST',
        data
    })
}

/**
 * 获取自身信息
 */
export function getInfo() {
    return request({
        url:USER_INFO,
        method: 'GET'
    })
}

/**
 * 获取用户信息
 */
export function getUserInfo(query) {
    return request({
        url: USER_INFO+"/"+query,
        method: 'GET'
    })
}